home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er 1994 August
/
64er_Magazin_94-08_1994_Markt__Technik_de_Side_A.d64
/
imp.source #3
< prev
next >
Wrap
Text File
|
2022-10-26
|
19KB
|
1,153 lines
;---------------------------------------
;
; - I M P E R O I D V 3 -
;
; - by Hannes Sommer -
;
; - (c) Magna Media '94 -
;
;---------------------------------------
v = 53248
be = $47f8
bord = 703
*= $8000
jmp title
cols .byte 0,0,0,0,0,0,0,0
.byte 0,0,0,0,0,0,0,0
.byte 0,9,8,10,15,7,1,1
.byte 1,1,13,3,14,4,6,0
.byte 0,0,0,0,0,0,0,0
.byte 0,0,0,0,0,0,0,0
;------------ F L I - Logo -------------
fli
lda #56
sta $d011
inc fly1+1
fly1 lda #0
lsr a
and #31
tay
ldx #0
fli0 lda cols,y
sta $50,x
iny
inx
cpx #15
bne fli0
lda #0
sta $5f
lda #49
fli1 cmp $d012
bcs fli1
ldx #3
fli2 dex
bne fli2
lda #63
ldx #8
sta $d011
stx $d018
lda $5f
sta $d020
sta $d021
lda #56
ldx #24
sta $d011
stx $d018
lda $5f
sta $d020
sta $d021
lda #57
ldx #40
sta $d011
stx $d018
lda $5f
sta $d020
sta $d021
lda #58
ldx #56
sta $d011
stx $d018
lda $5f
sta $d020
sta $d021
lda #59
ldx #72
sta $d011
stx $d018
lda $50
sta $d020
sta $d021
lda #60
ldx #88
sta $d011
stx $d018
lda $51
sta $d020
sta $d021
lda #61
ldx #104
sta $d011
stx $d018
lda $52
sta $d020
sta $d021
lda #62
ldx #120
sta $d011
stx $d018
lda $50
sta $d020
sta $d021
lda #63 ;Line #2
ldx #8
sta $d011
stx $d018
lda $51
sta $d020
sta $d021
lda #56
ldx #24
sta $d011
stx $d018
lda $52
sta $d020
sta $d021
lda #57
ldx #40
sta $d011
stx $d018
lda $53
sta $d020
sta $d021
lda #58
ldx #56
sta $d011
stx $d018
lda $50
sta $d020
sta $d021
lda #59
ldx #72
sta $d011
stx $d018
lda $51
sta $d020
sta $d021
lda #60
ldx #88
sta $d011
stx $d018
lda $52
sta $d020
sta $d021
lda #61
ldx #104
sta $d011
stx $d018
lda $53
sta $d020
sta $d021
lda #62
ldx #120
sta $d011
stx $d018
lda $54
sta $d020
sta $d021
lda #63 ;Line #3
ldx #8
sta $d011
stx $d018
lda $55
sta $d020
sta $d021
lda #56
ldx #24
sta $d011
stx $d018
lda $50
sta $d020
sta $d021
lda #57
ldx #40
sta $d011
stx $d018
lda $51
sta $d020
sta $d021
lda #58
ldx #56
sta $d011
stx $d018
lda $52
sta $d020
sta $d021
lda #59
ldx #72
sta $d011
stx $d018
lda $53
sta $d020
sta $d021
lda #60
ldx #88
sta $d011
stx $d018
lda $54
sta $d020
sta $d021
lda #61
ldx #104
sta $d011
stx $d018
lda $55
sta $d020
sta $d021
lda #62
ldx #120
sta $d011
stx $d018
lda $56
sta $d020
sta $d021
lda #63 ;Line #4
ldx #8
sta $d011
stx $d018
lda $57
sta $d020
sta $d021
lda #56
ldx #24
sta $d011
stx $d018
lda $50
sta $d020
sta $d021
lda #57
ldx #40
sta $d011
stx $d018
lda $51
sta $d020
sta $d021
lda #58
ldx #56
sta $d011
stx $d018
lda $52
sta $d020
sta $d021
lda #59
ldx #72
sta $d011
stx $d018
lda $53
sta $d020
sta $d021
lda #60
ldx #88
sta $d011
stx $d018
lda $54
sta $d020
sta $d021
lda #61
ldx #104
sta $d011
stx $d018
lda $55
sta $d020
sta $d021
lda #62
ldx #120
sta $d011
stx $d018
lda $56
sta $d020
sta $d021
lda #63 ;Line #5
ldx #8
sta $d011
stx $d018
lda $57
sta $d020
sta $d021
lda #56
ldx #24
sta $d011
stx $d018
lda $58
sta $d020
sta $d021
lda #57
ldx #40
sta $d011
stx $d018
lda $59
sta $d020
sta $d021
lda #58
ldx #56
sta $d011
stx $d018
lda $52
sta $d020
sta $d021
lda #59
ldx #72
sta $d011
stx $d018
lda $53
sta $d020
sta $d021
lda #60
ldx #88
sta $d011
stx $d018
lda $54
sta $d020
sta $d021
lda #61
ldx #104
sta $d011
stx $d018
lda $55
sta $d020
sta $d021
lda #62
ldx #120
sta $d011
stx $d018
lda $56
sta $d020
sta $d021
lda #63 ;Line #6
ldx #8
sta $d011
stx $d018
lda $57
sta $d020
sta $d021
lda #56
ldx #24
sta $d011
stx $d018
lda $58
sta $d020
sta $d021
lda #57
ldx #40
sta $d011
stx $d018
lda $59
sta $d020
sta $d021
lda #58
ldx #56
sta $d011
stx $d018
lda $54
sta $d020
sta $d021
lda #59
ldx #72
sta $d011
stx $d018
lda $55
sta $d020
sta $d021
lda #60
ldx #88
sta $d011
stx $d018
lda $56
sta $d020
sta $d021
lda #61
ldx #104
sta $d011
stx $d018
lda $57
sta $d020
sta $d021
lda #62
ldx #120
sta $d011
stx $d018
lda $58
sta $d020
sta $d021
lda #63 ;Line #7
ldx #8
sta $d011
stx $d018
lda $59
sta $d020
sta $d021
lda #56
ldx #24
sta $d011
stx $d018
lda $56
sta $d020
sta $d021
lda #57
ldx #40
sta $d011
stx $d018
lda $57
sta $d020
sta $d021
lda #58
ldx #56
sta $d011
stx $d018
lda $58
sta $d020
sta $d021
lda #59
ldx #72
sta $d011
stx $d018
lda $59
sta $d020
sta $d021
lda #60
ldx #88
sta $d011
stx $d018
lda $57
sta $d020
sta $d021
lda #61
ldx #104
sta $d011
stx $d018
lda $58
sta $d020
sta $d021
lda #62
ldx #120
sta $d011
stx $d018
lda $59
sta $d020
sta $d021
lda #63
ldx #12
sta $d011
stx $d018
lda #0
sta $d020
sta $d021
lda #88
sta $d011
rts
;--------------- G A M E ---------------
game
lda #64
sta $d011
sta $d020
sta $d021
ldx #0
in1 lda #255
sta $4000,x
lda #0
sta $d800,x
sta $d900,x
sta $da00,x
sta $db00,x
dex
bne in1
ldx #6
lda #255
in2 sta backxh,x
sta packxh,x
dex
bpl in2
lda #$44 ;Aufbau des
sta in6+2 ;Sterne-Himmels
ldx #0
stx in6+1
ldy #0
in5 tya
clc
adc starl,x
and #31
in6 sta $4400,y
iny
cpy #40
bne in5
lda in6+1
clc
adc #40
sta in6+1
bcc in7
inc in6+2
in7 inx
cpx #24
bne in5-2
ldx #39
in8 lda #32
sta $4400+960,x
lda #255
sta $4100,x
dex
bpl in8
lda #0
sta end+1
sta backpoint
sta packpoint
sta backspr
sta packspr
lda #1
sta t20+1
lda #15
sta t30+1
lda #14 ;Player-Init
sta c
lda #48
sta b
lda #80
sta x
lda #140
sta y
lda #0
sta xh
sei ;Irq+Grafik-Modi
lda #<irq
sta $fffe
lda #>irq
sta $ffff
lda #129
sta $d01a
lda #250
sta $d012
lda #27
sta $d011
lda #198
sta $dd00
lda #16
sta $d018
lda #200
sta $d016
cli
s1
end lda #0 ;Ende ?
beq noend
lda #64
sta $d011
sta $d021
sei
jmp title
noend
jmp s1
starl .byte 0,5,20,13,28
.byte 14,3,9,23,18
.byte 4,10,21,8,27
.byte 11,2,26,15,6
.byte 24,1,16,29,7
nmi inc end+1 ;*** NMI ***
rti
irq pha ;*** IRQ ***
txa
pha
tya
pha
lda $d019
sta $d019
bmi t1
lda $dc0d
cli
irqend pla
tay
pla
tax
pla
rti
t1
inc bord
lda #255
sta v+21
sta v+28
lda #11
sta v+37
lda #1
sta v+38
ldx #15
t5 lda starp,x ;Star-moving!
and #248
sta t6+1
txa
and #7
tay
lda #255
t6 sta $4000,y
lda starp,x
sec
sbc stars,x
sta starp,x
and #248
sta t7+1
lda starp,x
and #7
sta tt7+1
tt7 lda und
t7 sta $4000,y
dex
bpl t5
inc t8+1 ;Star-Flashing!
t8 lda #0
lsr a
and #15
tax
lda stflash,x
sta $d021
lda $dc00 ;Joystick-Control!
sta joyst
and #1
bne t11
lda y
cmp #52
bcc t12
sbc #2
sta y
t11 lda joyst
and #2
bne t12
lda y
cmp #224
bcs t12
adc #2
sta y
t12 lda joyst
and #4
bne t13
lda ix
cmp #13
bcc t14
lda x
sbc #2
sta x
bcs t14
dec xh
t13 lda joyst
and #8
bne t14
lda ix
cmp #160
bcs t14
lda x
adc #2
sta x
bcc t14
inc xh
t14
lda x ;Player-Sprite!
sta v
lda y
sta v+1
lda xh
sta v+16
lda b
sta be
lda c
sta v+39
dec t20+1
t20 lda #1 ;* New Back-Sprites *
bne t22-2
ldx backpoint
ldy backspr
lda backtime,x
bne t21
ldx #0
stx backpoint
lda backtime,x
t21 sta t20+1
lda backbdat,x
sta backb,y
lda #84
sta backx,y
lda #1
sta backxh,y
inc backpoint
inc backspr
lda backspr
cmp #7
bne t22-2
lda #0
sta backspr
ldx #6
t22 lda backx,x ;Back X-moving!
sec
sbc #4
sta backx,x
bcs t23
dec backxh,x
t23 lda backxh,x ;Back to Sprites!
bmi t25
beq t24
lda v+16
ora oder+1,x
sta v+16
t24 ldy mal2,x
lda backx,x
sta v+2,y
lda #50
sta v+3,y
lda backb,x
sta be+1,x
lda #15
sta v+40,x
t25 dex
bpl t22
dec t30+1
t30 lda #1 ;* New Pack-Sprites *
bne t32-2
ldx packpoint
ldy packspr
lda packtime,x
bne t31
ldx #0
stx packpoint
lda packtime,x
t31 sta t30+1
lda packbdat,x
sta packb,y
lda #84
sta packx,y
lda #1
sta packxh,y
inc packpoint
inc packspr
lda packspr
cmp #7
bne t32-2
lda #0
sta packspr
ldx #6
t32 lda packx,x ;Back X-moving!
sec
sbc #4
sta packx,x
bcs t33
dec packxh,x
t33 dex
bpl t32
t40 lda #0 ;* 1/3-Action *
bne t50
inc b ;Ship circling!
lda b
cmp #56
bne t41
lda #48
sta b
t41
ldx #7
t42 inc b,x
lda b,x
and #7
ora #64
sta b,x
dex
bne t42
jmp t70
t50 cmp #1 ;* 2/3-Action *
bne t60
jmp t70
t60 lda #255 ;* 3/3-Action *
sta t40+1
t70 inc t40+1
ldx #7
t80 lda x,x ;* x to ix *
lsr a
ldy xh,x
beq t81
ora #128
t81 sta ix,x
dex
bpl t80
k1 lda $d011
bmi k1
lda #71
k2 cmp $d012
bcs k2
lda v+16
and #1
sta v+16
ldx #6
k3 lda packxh,x ;Pack-Spr.oben!
bmi k5
beq k4
lda v+16
ora oder+1,x
sta v+16
k4 ldy mal2,x
lda packx,x
sta v+2,y
lda #80
sta v+3,y
lda packb,x
sta be+1,x
lda #15
sta v+40,x
k5 dex
bpl k3
lda #101
k20 cmp $d012
bcs k20
lda v+16
and #1
sta v+16
ldx #7
k21 ldy mal2,x ;* Enemy Sprites *
lda x,x
sta v,y
lda y,x
sta v+1,y
lda b,x
sta be,x
lda c,x
sta v+39,x
lda xh,x
beq k22
lda v+16
ora oder,x
sta v+16
k22 dex
bne k21
lda #190
k50 cmp $d012 ;Pack-Spr.unten!
bcs k50
lda v+16
and #1
sta v+16
ldx #6
k51 ldy mal2,x
lda packxh,x
bmi kk52
beq k52
lda v+16
ora oder+1,x
sta v+16
k52 lda #198
sta v+3,y
lda packx,x
sta v+2,y
lda packb,x
ora #8
sta be+1,x
lda #15
sta v+40,x
kk52 dex
bpl k51
lda #220
k53 cmp $d012 ;Back-Spr.unten!
bcs k53
lda v+16
and #1
sta v+16
ldx #6
k54 ldy mal2,x
lda backxh,x
bmi kk55
beq k55
lda v+16
ora oder+1,x
sta v+16
k55 lda #228
sta v+3,y
lda backx,x
sta v+2,y
lda backb,x
ora #8
sta be+1,x
lda #15
sta v+40,x
kk55 dex
bpl k54
lda #0
sta bord
jmp irqend
starp .byte 220,10,140,200
.byte 160,180,100,50
.byte 40,90,80,240
.byte 150,110,134,215
stars .byte 1,2,1,3,1,4,1,3
.byte 2,1,4,1,1,1,3,1
stflash .byte 11,12,12,15,3,13,7,1
.byte 1,1,7,13,3,15,12,12
;-------------- T I T L E --------------
title
sei
lda #0
sta $d020
sta $d021
sta $d01a
sta $d011
sta v+27
sta v+23
sta v+29
sta fly1+1
ldx #16
ti0 sta $d000,x
sta $d400,x
sta $d408,x
dex
bpl ti0
ldx #0
lda #$35
sta 1
ti1 lda $bc00,x
sta $d800,x
lda $bc18,x
sta $d818,x
lda #0
sta $d918,x
lda #9
sta $d940,x
sta $da40,x
sta $db00,x
dex
bne ti1
lda #<nmi
sta $fffa
sta $fffe
lda #>nmi
sta $fffb
sta $ffff
lda #196
sta 56576
lda #27
sta $d011
lda #224
sta 56322
ti20 lda $d011
bmi ti20
sei
lda #120
sta $d011
lda #216
sta 53270
lda #24
sta 53272
jsr fli ;** FLI-Logo! **
lda #24 ;Text-Mode
sta $d011
ldx #0 ;Colour-changing...
ti25 lda tiwait,x
cmp $d012
bcs ti25
lda ticol1,x
sta $d022
lda ticol2,x
sta $d023
inx
cpx #4
bne ti25
ti26 lda $dc00 ;Joy-Button ?
and #16
bne ti28
jmp game
ti28
ti99 lda $d011
bpl ti99
jmp ti20
joyst .byte 0
x .byte 0,200,225,225
.byte 250,250,19,19
xh .byte 0,0,0,0,0,0,1,1
y .byte 0,140,130,150
.byte 120,160,110,170
b .byte 0,64,65,71,66,70,67,69
c .byte 0,7,10,10,14,14,5,5
ix .byte 0,0,0,0,0,0,0,0
backx .byte 0,0,0,0,0,0,0
backxh .byte 0,0,0,0,0,0,0
backb .byte 0,0,0,0,0,0,0
backpoint .byte 0
backspr .byte 0
backtime .byte 6,20,6,6,15
.byte 6,40
.byte 6,6,6,15
.byte 6,6,40
.byte 30,20,6,6,6,6,40
.byte 0
backbdat .byte 128,130,128,129,130
.byte 128,130
.byte 128,129,129,130
.byte 128,129,130
.byte 131,132
.byte 128,129,129,129,130
packx .byte 0,0,0,0,0,0,0
packxh .byte 0,0,0,0,0,0,0
packb .byte 0,0,0,0,0,0,0
packpoint .byte 0
packspr .byte 0
packtime .byte 32,22,12,22
.byte 6,32,38
.byte 0
packbdat .byte 131,131,132,131
.byte 128,130,131
oder .byte 1,2,4,8,16,32,64,128
mal2 .byte 0,2,4,6,8,10,12,14
tiwait .byte 100,134,158,188
ticol1 .byte 9,6,9,4
ticol2 .byte 5,14,10,12
*= $9f00
und .byte 127,191,223,239
.byte 247,251,253,254